package com.woniu.service.command;

import com.woniu.outlet.redis.po.FundRedis;
import com.woniu.util.ApplicationContextHolder;
import lombok.Data;

/**
 * @description:
 * @author: my
 * @time: 2021/4/21 15:14
 */
@Data
public class FundDetailCommand {
    private FundDetailCommandHandler handler;
    private String code;

    public FundDetailCommand() {
        this.handler =
                ApplicationContextHolder.getApplicationContext().getBean(FundDetailCommandHandler.class);
    }

    public FundDetailCommand(String code){
        this();
        this.code = code;
    }

    public FundRedis execute(){
        return handler.action(this);
    }
}
